package day13.practice.test;

/**
 * @Author juzipi
 * @Date 2021/6/29 11:09
 * @Info
 */
public class MyRectangle extends GeometricObject {

    private double width;

    private double height;

    public MyRectangle(String color, double weight, double width, double height) {
        super(color, weight);
        this.width = width;
        this.height = height;
    }

    @Override
    public double getArea() {
        return width * height;
    }

    public double getWidth() {
        return width;
    }

    public void setWidth(double width) {
        this.width = width;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }
}
